let bgColor = "#fff";
let title = "总量";
let color = [
  "#2A8BFD",
  "#BAFF7F",
  "#00FAC1",
  "#00CAFF",
  "#FDE056",
  "#4ED33C",
  "#FF8A26",
  "#FF5252",
  "#9689FF",
  "#CB00FF",
];
let echartData = [
  {
    name: "A类",
    value: "3720",
  },
  {
    name: "B类",
    value: "2920",
  },
  {
    name: "C类",
    value: "2200",
  },
  {
    name: "D类",
    value: "1420",
  },
  {
    name: "E类",
    value: "3200",
  }
];

let formatNumber = function (num) {
  let reg = /(?=(\B)(\d{3})+$)/g;
  return num.toString().replace(reg, ",");
};
let total = echartData.reduce((a, b) => {
  return a + b.value * 1;
}, 0);

export const options1 = {
  legend: {
    right: 10,
    top: "center",
    width: 120,
  },
  color: color,
  tooltip: {
    trigger: "item",
  },
  series: [
    {
      type: "pie",
      roseType: "radius",
      radius: ["20%", "50%"],
      center: ["25%", "50%"],
      data: echartData,
      hoverAnimation: false,
      labelLine: {
        normal: {
          length: 3,
          length2: 5,
        },
      },
    },
  ],
};
